//-------------------------------------------------------------------
//	Copyright (c) 2010-2012 Zhirnov Andrey
//	This file is part of the "UXGEN" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------

#ifndef _UX_TEXTURE_2D_MULTISAMPLE_ARRAY_H
#define _UX_TEXTURE_2D_MULTISAMPLE_ARRAY_H

#include "CTexture.h"

namespace Engine
{
namespace Resources
{

	//
	// Texture 2D Multisample Array
	//

	class _EXPORT_ CTexture2DMSArray : public CTexture
	{
	protected:
		CTexture2DMSArray();
		virtual ~CTexture2DMSArray();
		
		virtual bool _Load(IFilePtr pFile, uint uSize)			{ return false; }
		virtual bool _Save(IFilePtr pFile)						{ return false; }

	public:
		bool Create(const uvec3 &vDim, e_tex_format::type eInternalFormat, uint16 uSamples);
		bool Create(const uvec3 &vDim, e_tex_format::type eInternalFormat, uint16 uCoverage, uint16 uColor);
		
		bool ChangeFlags(e_tex_flags::type eFlags)				{ return false; }
		bool SetSwizzle(e_tex_swizzle::type eSwizzleFlags)		{ return false; }
		
		virtual bool Create(const uvec3 &sDim, e_tex_format::type eFormat, e_tex_swizzle::type eSwizzle,
								e_tex_flags::type eFlags, uint16 uSamples = 0);
		
		bool			CSAASupported()			const;
		uint			SamplesCount()			const;		// MSAA or CSAA
		uint			ColorSamples()			const;		// color samples if use CSAA
		bool			GenMipmaps()			const	{ return false; }
		virtual uint16	GetSamplesCount()		const	{ return SamplesCount(); }

		virtual e_resource::type	GetType()		const	{ return e_resource::TEXTURE_2D_MS_ARRAY; }
		
		static CTexture2DMSArrayPtr s_CreateTexture2DMSArray();
	};

//-------------------------------------------------------------------

}	// Resources
}	// Engine

#endif	// _UX_TEXTURE_2D_MULTISAMPLE_ARRAY_H
